package com.service.impl;

import com.dao.ProductMapper;
import com.entity.Product;
import com.entity.ProductExample;
import com.service.ProductService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * 产品信息表
 * @author huyongzj
 *
 */
@Service
public class ProductServiceImpl implements ProductService{
	@Autowired
	private ProductMapper productMapper;
	
	@Override
	public int deleteByPrimaryKey(Long prodId) {
		// TODO Auto-generated method stub
		return productMapper.deleteByPrimaryKey(prodId);
	}

	@Override
	public int insert(Product record) {
		// TODO Auto-generated method stub
		return productMapper.insert(record);
	}

	@Override
	public int insertSelective(Product record) {
		// TODO Auto-generated method stub
		return productMapper.insertSelective(record);
	}

	@Override
	public List<Product> selectByExample() {
		// TODO Auto-generated method stub
		ProductExample example = new ProductExample();
		return productMapper.selectByExample(example);
	}

	@Override
	public Product selectByPrimaryKey(Long prodId) {
		// TODO Auto-generated method stub
		return productMapper.selectByPrimaryKey(prodId);
	}

	@Override
	public int updateByPrimaryKeySelective(Product record) {
		// TODO Auto-generated method stub
		return productMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Product record) {
		// TODO Auto-generated method stub
		return productMapper.updateByPrimaryKey(record);
	}

	@Override
	public List<Product> getAllProduct() {
		// TODO Auto-generated method stub
		return productMapper.getAllProduct();
	}
  
}